#!/usr/bin/env python 
# -*- coding: utf-8 -*-
# @Time    : 2022/9/21 9:19
# @Author  : Junzhao
# @File    : become_one.py
# @Software: PyCharm
# 一个整数 n 偶数
count = 0


def t(n: int):
    global count

    if n != 1:
        count += 1
        if n % 2 == 0:
            n /= 2
            print(n)
            t(n)
        else:
            n = n * 3 + 1
            print(n)
            t(n)


t(int(input("输入一个整数")))
print(count)
